import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop016_删除侧边设置"
# 打开dbshop的后台
firefox=openBrowser(urlAdmin)
#调用自定义函数进行后台的登录
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'商品管理','管理分类','前台侧边设置')
firefox.find_element_by_xpath('//td[contains(.,"%s")]/following-sibling::td[3]/a[2]'%setname).click()
firefox.switch_to.alert.accept()
time.sleep(3)

#断言
try:
    firefox.find_element_by_xpath("//td[contains(.,'%s')]"%setname)
    writeLog("%s 测试失败"%testCase)
    getPhoto(firefox)
except:
    writeLog("%s 测试通过" % testCase)
firefox.quit()





